package org.wzys.Mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.wzys.Pojo.User;
import org.wzys.Pojo.UserQueryparm;

import java.util.List;

@Mapper
public interface UserMapper {
    List<User> list(UserQueryparm userQueryparm);

    void delete(List<Integer> ids);

    void add(User user);

    User getbyid(Integer id);

    void update(User user);

    @Select("select * from user where username = #{username} and password = #{password}")
    User getUsernameAndPassword(User user);


    @Insert("insert into user(username,password,email,phone,update_time) values(#{username},#{password},#{email},#{phone},#{updateTime})")
    void register(User user);
}
